//T10085. 鱼塘钓鱼
#include <iostream>
#include <queue>
using namespace std;
const int MAXN=100;
int fish[MAXN+1],fishdec[MAXN+1],tonext[MAXN+1];
int n,t;
int ans;
int main(){
    cin>>n;
    for(int i=1;i<=n;i++) cin>>fish[i];
    for(int i=1;i<=n;i++) cin>>fishdec[i];
    for(int i=1;i<n;i++) cin>>tonext[i];
    cin>>t;

    for(int k=1;k<=n;k++){
        t-=tonext[k-1];
        priority_queue<int> heap;
        for(int i=1;i<=k;i++){
            int cur=fish[i];
            while(cur>0){
                heap.push(cur);
                cur-=fishdec[i];
            }
        }
        int fishsum=0;
        int t1=t;
        while(t1>0&&!heap.empty()){
            fishsum+=heap.top();
            heap.pop();
            t1--;
        }
        if (fishsum>ans) ans=fishsum;
    }
    cout<<ans;
}